package org.ourgrid.broker.scheduler.workqueue.xmlcreator;

public class AddJobXMLCreator implements XMLCreatorIF{

	/**
	 * <ADD_JOB jobID='int' errorMessage='String'/> 
	 */
	
	public String getXML(int jobID, String errorMessage){
		
		StringBuffer buffer = new StringBuffer();
		
		String msg = "";
		
		if (errorMessage != null) {
			msg = errorMessage;
		}
		
		buffer.append("<ADD_JOB ");
		buffer.append("jobID='" + jobID + "' ");
		buffer.append("errorMessage='" + msg + "' ");
		buffer.append("/>");
		
		return buffer.toString();
	}
}
